<html><head><title>Printer.pb</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<pre><font face="Courier New, Courier, mono"size="2"><font color="#006666">;
</font><font color="#006666">; ------------------------------------------------------------
</font><font color="#006666">;
</font><font color="#006666">;   PureBasic - Printer example file
</font><font color="#006666">;
</font><font color="#006666">;    (c) Fantaisie Software
</font><font color="#006666">;
</font><font color="#006666">; ------------------------------------------------------------
</font><font color="#006666">;
</font>
<b><font color="#006666">If</font></b> <font color="#006666">PrintRequester</font>()

  <b><font color="#006666">If</font></b> <font color="#006666">StartPrinting</font>("PureBasic Test")
  
<font color="#006666">    LoadFont</font>(0, "Arial", 30)
<font color="#006666">    LoadFont</font>(1, "Arial", 100)
  
    <b><font color="#006666">If</font></b> <font color="#006666">StartDrawing</font>(<font color="#006666">PrinterOutput</font>())
      
<font color="#006666">      BackColor</font>(<font color="#006666">RGB</font>(255, 255, 255)) <font color="#006666">; Uses white as back color, usuful when printing on a white sheet
</font><font color="#006666">      FrontColor</font>(<font color="#006666">RGB</font>(0, 0, 0)) <font color="#006666">; Use black for standard text color
</font>      
<font color="#006666">      DrawingFont</font>(<font color="#006666">FontID</font>(0))
<font color="#006666">      DrawText</font>(100, 100, "PureBasic Printer Test")
      
<font color="#006666">      DrawingFont</font>(<font color="#006666">FontID</font>(1))
<font color="#006666">      DrawText</font>(100, 400, "PureBasic Printer Test 2")
    
      <b><font color="#006666">If</font></b> <font color="#006666">LoadImage</font>(0, <font color="#924B72">#PB_Compiler_Home</font> + "examples/sources/Data/PureBasic.bmp")
<font color="#006666">        DrawImage</font>(<font color="#006666">ImageID</font>(0), 200, 600)
      <b><font color="#006666">Else</font></b>
<font color="#006666">        MessageRequester</font>("Error","Can't load the image")
      <b><font color="#006666">EndIf</font></b>
      
<font color="#006666">      Box</font>(200, 1000, 100, 100,<font color="#006666"> RGB</font>(255, 0, 0)) <font color="#006666">; Draw a red box
</font>        
<font color="#006666">      StopDrawing</font>()
    <b><font color="#006666">EndIf</font></b>
    
<font color="#006666">    StopPrinting</font>()
  <b><font color="#006666">EndIf</font></b>
<b><font color="#006666">EndIf</font></b></font></pre>
</body></html>
